<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>商品详情页设置</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
	<style>
	.tabBar{ width:340px; height:50px;background:#fff; border-top:1px #dedede solid;position:absolute;bottom:0}
	.tabBar-tab{ width:100%; text-align:center; padding:0px; margin:0px; table-layout:fixed; }
	.tabBar-tab td{ border:none;  margin:0px; text-align:center; padding:5px 0 1px 0;display: table-cell;cursor:pointer}
	.tabBar-tab td img{ width:24px; height:24px; margin:0 auto; }
	.tabBar-tab td span{ display:block; width:100%; height:18px; line-height:18px; font-size:12px; }
	.right-div{border-radius: 20px;overflow: hidden;width: 90%;margin: 0 auto;}
	.right-div .but-class{width: 50%;height: 34px;line-height:34px;color: #fff;font-size:12px;cursor:pointer;}
	.floatdiv{float: left;clear: both;padding-left: 130px;margin-top:5px;}
	{if $menudata['list'][0]['menuType']!=3}
	.shoucangshow0{display: none;}
	{/if}
	{if $menudata['list'][1]['menuType']!=3}
	.shoucangshow1{display: none;}
	{/if}
	{if $menudata['list'][2]['menuType']!=3}
	.shoucangshow2{display: none;}
	{/if}

	{if $menudata['list'][0]['menuType']!=1}
	.kefushow0{display: none;}
	{/if}
	{if $menudata['list'][1]['menuType']!=1}
	.kefushow1{display: none;}
	{/if}
	{if $menudata['list'][2]['menuType']!=1}
	.kefushow2{display: none;}
	{/if}

	{if $menudata['list'][0]['useSystem']==1 && $menudata['list'][0]['menuType']==1}
	.useSystem0{display: none;}
	{/if}
	{if $menudata['list'][1]['useSystem']==1 && $menudata['list'][1]['menuType']==1}
	.useSystem1{display: none;}
	{/if}
	{if $menudata['list'][2]['useSystem']==1 && $menudata['list'][2]['menuType']==1}
	.useSystem2{display: none;}
	{/if}
	
	{if $showbusiness == 1}
	.showdetaile{display: none;}
	{/if}
	{if $showbusiness == 0}
	.shoubusiness{display: none;}
	{/if}
	
	</style>
</head>
<body>
  <div class="layui-fluid showdetaile">
    <div class="layui-row layui-col-space15">
			<div class="layui-card layui-col-md12">
				<div class="layui-card-header">
					<i class="fa fa-pencil"></i> 商品详情页设置
				</div>
				<div class="layui-card-body layui-col-md12" pad15 ng-app="myApp" ng-controller="personCtrl">
					<div class="dsn-phone">
						<div class="dsn-phone-left"></div>
						<div class="dsn-phone-center">
							<div class="dsn-phone-top"></div>
							<div class="dsn-phone-main">
								<div id="editor">
									<div class="dsn-mod dsn-topbar dsn-mod-nohover" style="{if $type=='mp'}color:#fff;background:#333;{else}color:#fff;background:#000;{/if}">
										<div style="float:left;width:100%;font-size:12px">
											<div style="float:left;width:30%">&nbsp;<i class="fa fa-signal"></i> wechat <i class="fa fa-wifi"></i></div>
											<div style="float:left;text-align:center;width:40%">12:00</div>
											<div style="float:left;text-align:right;width:30%">100% <i class="fa fa-battery-full"></i>&nbsp;</div>
										</div>
										<div style="float:left;width:98%;margin:2px 1% 0 1%;">
											<div style="float:left;width:30%">&nbsp;</div>
											<div style="float:left;text-align:center;width:40%;font-size:16px;height:27px;line-height:27px">商品详情</div>
										</div>
									</div>
									<div id="editor-content">
									<div style="margin-top:200px;font-size:26px;color:#ccc;width:100%;text-align:center">内容显示区域</div>
										<div>
											<img ng-src="{{menudata.bottomImg}}"  ng-show="menudata.bottomImg" style="width: 100%;position: absolute;bottom: 50px;height: auto;"/>
										</div>

									<div id="tabBar" class="tabBar" style="overflow:hidden;background:#fff;border-top:1px {{menudata.borderStyle=='black'?'#e5e5e5':'#e5e5e5'}} solid;">
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabBar-tab">
										<tbody><tr id="sortable">
											<td ng-show="3 > $index" ng-click="menuselectedchange($index)" data-key="{{ key }}" ng-repeat="(key,thismenu) in menudata.list track by $index">
												 <img ng-src="{{thismenu.iconPath}}" ng-show="menuselected!=$index"/>
												 <img ng-src="{{thismenu.selectedIconPath}}" ng-show="menuselected==$index"/>
												 <span style="color:#222222;font-size:10px" ng-show="menuselected!=$index">{{thismenu.text || '编辑菜单'}}</span>
												 <span style="color:#222222;font-size:10px" ng-show="menuselected==$index">{{thismenu.text || '编辑菜单'}}</span>
											</td>
											<td style="width: 60%;">
												<div class="right-div flex-x-center flex-y-center">
													<div class='but-class' style="background:{:t('color2')};">加入购物车</div>
													<div class='but-class' style="background:{:t('color1')};">立即购买</div>
												</div>
											</td>
											
										</tr>
										</tbody>
										</table>
										
									</div>
									</div>
								</div>
							</div>
							<div class="dsn-phone-bottom"></div>
						</div>
						<div class="dsn-phone-right"></div>
					</div>
					
					<div class="layui-form form-label-w6 layui-col-md7" lay-filter="">
						<div ng-show="menucount>0">
							<div class="layui-form-item">
								<label class="layui-form-label">菜单一</label>
								<div>
									<span class="layui-form-mid">菜单类型</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="menuType0" value="1" ng-click="chooseMenuType(0,1)" ng-model="menudata.list[0].menuType" title="客服"  {if $menudata['list'][0]['menuType']==1}checked{/if}/></label>
                						<label><input type="radio" name="menuType0" value="2" ng-click="chooseMenuType(0,2)" ng-radio="menudata.list[0].menuType" title="购物车"  {if $menudata['list'][0]['menuType']==2}checked{/if}/></label>
                						<label><input type="radio" name="menuType0" value="3" ng-click="chooseMenuType(0,3)" ng-radio="menudata.list[0].menuType" title="收藏"  {if $menudata['list'][0]['menuType']==3}checked{/if}/></label>
                						<label><input type="radio" name="menuType0" value="4" ng-click="chooseMenuType(0,4)" ng-radio="menudata.list[0].menuType" title="其它"  {if $menudata['list'][0]['menuType']==4}checked{/if}/></label>
									</div>
								</div>
								<div class="kefushow0" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否跟随</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="useSystem0" value="1" ng-click="chooseuseSystem(0,1)" ng-model="menudata.list[0].useSystem" title="{if $info['bid']>0}内部客服{else}跟随系统{/if}"  {if $menudata['list'][0]['useSystem']==1}checked{/if}/></label>
                						<label><input type="radio" name="useSystem0" value="0" ng-click="chooseuseSystem(0,0)" ng-radio="menudata.list[0].useSystem" title="自定义"  {if $menudata['list'][0]['useSystem']==0}checked{/if}/></label>
									</div>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">名称</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="text0" autocomplete="off" class="layui-input" ng-model="menudata.list[0].text">
									</div>
									<span class="layui-form-mid shoucangshow0">选中名称</span>
									<div class="layui-input-inline shoucangshow0" style="width:210px">
										<input type="text" name="selectedtext0" autocomplete="off" class="layui-input" ng-model="menudata.list[0].selectedtext">
									</div>
								</div>
								<div class="useSystem0" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">链接</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="pagePath0" autocomplete="off" class="layui-input" ng-model="menudata.list[0].pagePath">
									</div>
									<button class="layui-btn layui-btn-primary" ng-click="chooseUrl(0)" style="float:left">选择链接</button>
									<span class="layui-form-mid" style="width:200px;">&nbsp;{{menudata.list[0].pagePathname}}</span>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">图标</span>
									<button class="layui-btn layui-btn-primary" ng-click="uploadImg(0,1,'')">上传图标</button>
									<img style="width:38px;height:38px;" ng-src="{{menudata.list[0].iconPath}}"/>
									<button class="layui-btn layui-btn-primary shoucangshow0" ng-click="uploadImg(0,2,'')">选中图标</button>
									<span class="shoucangshow0"><img style="width:38px;height:38px;" ng-src="{{menudata.list[0].selectedIconPath}}"/></span>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否显示</span>
									<div class="layui-input-inline">
										<label><input type="radio" name="isShow0" value="1" ng-click="chooseradio(0,1)" ng-model="menudata.list[0].isShow" title="显示"  {if $menudata['list'][0]['isShow']==1}checked{/if}/></label>
                						<label><input type="radio" name="isShow0" value="0" ng-click="chooseradio(0,0)" ng-radio="menudata.list[0].isShow" title="不显示"  {if $menudata['list'][0]['isShow']==0}checked{/if}/></label>
									</div>
								</div>
								
							</div>
							<div class="layui-form-item" ng-show="menucount>1">
								<label class="layui-form-label">菜单二</label>
								<div>
									<span class="layui-form-mid">菜单类型</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="menuType1" value="1" ng-click="chooseMenuType(1,1)" ng-model="menudata.list[1].menuType" title="客服"  {if $menudata['list'][1]['menuType']==1}checked{/if}/></label>
                						<label><input type="radio" name="menuType1" value="2" ng-click="chooseMenuType(1,2)" ng-radio="menudata.list[1].menuType" title="购物车"  {if $menudata['list'][1]['menuType']==2}checked{/if}/></label>
                						<label><input type="radio" name="menuType1" value="3" ng-click="chooseMenuType(1,3)" ng-radio="menudata.list[1].menuType" title="收藏"  {if $menudata['list'][1]['menuType']==3}checked{/if}/></label>
                						<label><input type="radio" name="menuType1" value="4" ng-click="chooseMenuType(1,4)" ng-radio="menudata.list[1].menuType" title="其它"  {if $menudata['list'][1]['menuType']==4}checked{/if}/></label>
									</div>
								</div>
								<div class="kefushow1" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否跟随</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="useSystem1" value="1" ng-click="chooseuseSystem(1,1)" ng-model="menudata.list[1].useSystem" title="{if $info['bid']>0}内部客服{else}跟随系统{/if}"  {if $menudata['list'][1]['useSystem']==1}checked{/if}/></label>
                						<label><input type="radio" name="useSystem1" value="0" ng-click="chooseuseSystem(1,0)" ng-radio="menudata.list[1].useSystem" title="自定义"  {if $menudata['list'][1]['useSystem']==0}checked{/if}/></label>
									</div>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">名称</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="text1" autocomplete="off" class="layui-input" ng-model="menudata.list[1].text">
									</div>
									<span class="layui-form-mid shoucangshow1">选中名称</span>
									<div class="layui-input-inline shoucangshow1" style="width:210px">
										<input type="text" name="selectedtext1" autocomplete="off" class="layui-input" ng-model="menudata.list[1].selectedtext">
									</div>
								</div>
								<div class="useSystem1" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">链接</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="pagePath1" autocomplete="off" class="layui-input" ng-model="menudata.list[1].pagePath">
									</div>
									<button class="layui-btn layui-btn-primary" ng-click="chooseUrl(1)" style="float:left">选择链接</button>
									<span class="layui-form-mid" style="width:200px;">&nbsp;{{menudata.list[1].pagePathname}}</span>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">图标</span>
									<button class="layui-btn layui-btn-primary" ng-click="uploadImg(1,1,'')">上传图标</button>
									<img style="width:38px;height:38px;" ng-src="{{menudata.list[1].iconPath}}"/>
									<button class="layui-btn layui-btn-primary shoucangshow1" ng-click="uploadImg(1,2,'')">选中图标</button>
									<span class="shoucangshow1"><img style="width:38px;height:38px;" ng-src="{{menudata.list[1].selectedIconPath}}"/></span>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否显示</span>
									<div class="layui-input-inline">
										<label><input type="radio" name="isShow1" value="1" ng-click="chooseradio(1,1)" ng-model="menudata.list[1].isShow" title="显示"  {if $menudata['list'][1]['isShow']==1}checked{/if}/></label>
                						<label><input type="radio" name="isShow1" value="0" ng-click="chooseradio(1,0)" ng-radio="menudata.list[1].isShow" title="不显示"  {if $menudata['list'][1]['isShow']==0}checked{/if}/></label>
									</div>
								</div>
								
							</div>
							<div class="layui-form-item" ng-show="menucount>2">
								<label class="layui-form-label">菜单三</label>
								<div>
									<span class="layui-form-mid">菜单类型</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="menuType2" value="1" ng-click="chooseMenuType(2,1)" ng-model="menudata.list[2].menuType" title="客服"  {if $menudata['list'][2]['menuType']==1}checked{/if}/></label>
                						<label><input type="radio" name="menuType2" value="2" ng-click="chooseMenuType(2,2)" ng-radio="menudata.list[2].menuType" title="购物车"  {if $menudata['list'][2]['menuType']==2}checked{/if}/></label>
                						<label><input type="radio" name="menuType2" value="3" ng-click="chooseMenuType(2,3)" ng-radio="menudata.list[2].menuType" title="收藏"  {if $menudata['list'][2]['menuType']==3}checked{/if}/></label>
                						<label><input type="radio" name="menuType2" value="4" ng-click="chooseMenuType(2,4)" ng-radio="menudata.list[2].menuType" title="其它"  {if $menudata['list'][2]['menuType']==4}checked{/if}/></label>
									</div>
								</div>
								<div class="kefushow2" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否跟随</span>
									<div class="layui-input-inline" style="width:400px">
										<label><input type="radio" name="useSystem2" value="1" ng-click="chooseuseSystem(2,1)" ng-model="menudata.list[2].useSystem" title="{if $info['bid']>0}内部客服{else}跟随系统{/if}"  {if $menudata['list'][2]['useSystem']==1}checked{/if}/></label>
                						<label><input type="radio" name="useSystem2" value="0" ng-click="chooseuseSystem(2,0)" ng-radio="menudata.list[2].useSystem" title="自定义"  {if $menudata['list'][2]['useSystem']==0}checked{/if}/></label>
									</div>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">名称</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="text2" autocomplete="off" class="layui-input" ng-model="menudata.list[2].text">
									</div>
									<span class="layui-form-mid shoucangshow2">选中名称</span>
									<div class="layui-input-inline shoucangshow2" style="width:210px">
										<input type="text" name="selectedtext2" autocomplete="off" class="layui-input" ng-model="menudata.list[2].selectedtext">
									</div>
								</div>

								<div class="useSystem2" calss="shoucangshow2" style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">链接</span>
									<div class="layui-input-inline" style="width:210px">
										<input type="text" name="pagePath2" autocomplete="off" class="layui-input" ng-model="menudata.list[2].pagePath">
									</div>
									<button class="layui-btn layui-btn-primary" ng-click="chooseUrl(2)" style="float:left">选择链接</button>
									<span class="layui-form-mid" style="width:200px;">&nbsp;{{menudata.list[2].pagePathname}}</span>
								</div>
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">图标</span>
									<button class="layui-btn layui-btn-primary" ng-click="uploadImg(2,1,'')">上传图标</button>
									<img style="width:38px;height:38px;" ng-src="{{menudata.list[2].iconPath}}"/>
									<button class="layui-btn layui-btn-primary shoucangshow2" ng-click="uploadImg(2,2,'')">选中图标</button>
									<span class="shoucangshow2"><img calss="shoucangshow2" style="width:38px;height:38px;" ng-src="{{menudata.list[2].selectedIconPath}}"/></span>
								</div>								
								<div style="float: left;clear: both;padding-left: 130px;margin-top:5px">
									<span class="layui-form-mid">是否显示</span>
									<div class="layui-input-inline">
										<label><input type="radio" name="isShow2" value="1" ng-click="chooseradio(2,1)" ng-model="menudata.list[2].isShow" title="显示"  {if $menudata['list'][2]['isShow']==1}checked{/if}/></label>
                						<label><input type="radio" name="isShow2" value="0" ng-click="chooseradio(2,0)" ng-radio="menudata.list[2].isShow" title="不显示"  {if $menudata['list'][2]['isShow']==0}checked{/if}/></label>
									</div>
								</div>
								
								
							</div>
								<div class="layui-form-item">
									<label class="layui-form-label">商品描述<br>公共底部图片</label>
									<div class="layui-input-inline" style="width:400px">
										<input type="text" name="bottomImg" id="bottomImg" lay-verType="tips" ng-model="menudata.bottomImg" class="layui-input" style="width: 300px;display: inline-block;">
										<button  type="button" class="layui-btn layui-btn-primary" upload-input="bottomImg" upload-preview="bottomImgPreview" onclick="uploader(this)">上传图片</button>
										<div class="layui-form-mid layui-word-aux">用于展示公共的价格说明等信息</div>

										<div id="bottomImgPreview" style="float:left;clear: both;">
											<div class="layui-imgbox" style="width:150px;">
												<a {if $menudata['bottomImg']}style="display: block;" {else /} style="display: none;"  {/if} class="layui-imgbox-close" href="javascript:void(0)" ng-click="clearbottomImg()" title="删除"><i class="layui-icon layui-icon-close-fill-opaque"></i></a>
												<div class="layui-imgbox-img"><img src="{$menudata['bottomImg']}"/></div>
											</div>
										</div>
									</div>
								</div>

								

								
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label"></label>
							<div class="layui-input-block">
								<button class="layui-btn" ng-click="save(0)">保存</button>
							</div>
						</div>
					</div>
				</div>
			</div>
    </div>
  </div>

  <div class="layui-fluid shoubusiness">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header">
			<i class="fa fa-pencil"></i> 商品详情页设置
		  </div>
		<div class="layui-card-body" pad15>
			<div class="layui-form form-label-w8">
				<input type="hidden" name="binfo[id]" value="{$binfo.id}"/>
				<div class="layui-form-item">
					<label class="layui-form-label">客服链接</label>
					<div class="layui-input-inline" style="width:300px">
						<input type="text" name="binfo[kfurl]" value="{$binfo.kfurl}" class="layui-input"/>
					</div>
					<div class="layui-form-mid layui-word-aux">商品详情页客服链接，不填写则使用商城内部客服系统</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">商品描述<br>公共底部图片</label>
					<div class="layui-input-inline" style="width:400px">
						<input type="text" name="binfo[bottomImg]" id="business_bottomImg" value="{$binfo['bottomImg']}" lay-verType="tips" class="layui-input" style="width: 300px;display: inline-block;">
						<button  type="button" class="layui-btn layui-btn-primary" upload-input="business_bottomImg" upload-preview="business_bottomImgPreview" onclick="uploader(this)">上传图片</button>
						<div class="layui-form-mid layui-word-aux">用于展示公共的价格说明等信息</div>
						<div id="business_bottomImgPreview" style="float:left;clear: both;">
							<div class="layui-imgbox" style="width:150px;">
								<a {if $binfo['bottomImg']}style="display: block;" {else /} style="display: none;"  {/if} class="layui-imgbox-close" href="javascript:void(0)" onclick="clearbottomImg2()" title="删除"><i class="layui-icon layui-icon-close-fill-opaque"></i></a>
								<div class="layui-imgbox-img"><img src="{$binfo['bottomImg']}"/></div>
							</div>
						</div>
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label" ></label>
					<div class="layui-input-block">
						<button class="layui-btn layui-btn-danger" lay-submit lay-filter="formsubmit">提 交</button>
					</div>
				</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

	{include file="public/js"/}
	<script src="__STATIC__/admin/js/jscolor.js"></script>
	<script type="text/javascript" src="__STATIC__/admin/js/angular.min.js"></script>
	<script type="text/javascript" src="__STATIC__/admin/js/angular-ueditor.js"></script>
	
	<script>
	var app = angular.module('myApp', ['ng.ueditor']);
	app.controller('personCtrl', function($scope) {
			$scope.indexurl = '{$info.indexurl}'; //启动页地址
			$scope.menuselected = 0;
			$scope.menucount = {$info.menucount};
			$scope.menudata = {$info.menudata},
			$scope.uploadImg = function(Mid,type,params){
				fileUploader.show(function(data){
					if(type==1){
						$scope.menudata.list[Mid].iconPath = data['url'] + params;
					}else{
						$scope.menudata.list[Mid].selectedIconPath = data['url'] + params;
					}
					$scope.$apply();
				}, {type :'image',maxheight:110,maxwidth:110});
			},
			$scope.clearbottomImg = function(){
				$('#bottomImgPreview').find('img').attr('src','').hide();
				$('#bottomImgPreview').find('a').hide();
				$scope.menudata.bottomImg = '';
			},
			$scope.chooseUrl = function(Mid){
				$('#floating-link').attr({"Mid":Mid});
				layer.open({type:2,shadeClose:true,area:['1200px', '650px'],'title':'选择链接',content:"{:url('DesignerPage/chooseurl')}/args/"+Mid})
			},
			$scope.chooseradio = function(Mid,val){
				$scope.menudata.list[Mid].isShow = val;
			},
			$scope.chooseradiomd = function(val){
				$scope.menudata.isShowMd = val;
			},
			$scope.chooseuseSystem = function(Mid,val){
				$scope.menudata.list[Mid].useSystem = val;
				if(val == 0){
					$('.useSystem'+Mid).show();
				}else{
					$('.useSystem'+Mid).hide();
					$scope.menudata.list[Mid].pagePath = ''
				}
			},
			$scope.chooseMenuType = function(Mid,val){
				$scope.menudata.list[Mid].menuType = val;				
				if(val == 3){
					$('.shoucangshow'+Mid).show();
				}else{
					$('.shoucangshow'+Mid).hide();
				}
				if(val == 1){
					$('.kefushow'+Mid).show();
					if($scope.menudata.list[Mid].useSystem == 1){
						$scope.menudata.list[Mid].pagePath = ''
						$('.useSystem'+Mid).hide();
					}
				}else{
					$('.kefushow'+Mid).hide();
					$('.useSystem'+Mid).show();
				}
			},
			$scope.chooseLink = function(urlname,url,args){
				var Mid = args
				if(url){
					if(Mid == 'indexurl'){
						$scope.indexurl = url
					}else{
						$scope.menudata.list[Mid].pagePath = url;
						$scope.menudata.list[Mid].pagePathname = urlname;
						layer.closeAll();
					}
				}
			},
			$scope.menuselectedchange = function(index1){
				$scope.menuselected = index1
			},
			$scope.save = function(type){
				var field = new Object();
				field.navigationBarBackgroundColor = $scope.navigationBarBackgroundColor;
				field.navigationBarTextStyle = $scope.navigationBarTextStyle;
				field.menucount = $scope.menucount;
				field.menudata = $scope.menudata;
				field.indexurl = $scope.indexurl;
				var loadlay = layer.open({type:3})
				$.post("{:url('shopdetailsave')}/type/{$type}",{info:field},function(data){
					if(type == 0){
						layer.close(loadlay);
						dialog(data.msg,data.status,data.url);
					}else{
						if(data.status==1){
							$.post("{:url('download')}",{},function(data){
								layer.close(loadlay);
								dialog(data.msg,data.status,data.url);
							})
						}else{
							layer.close(loadlay);
							dialog(data.msg,data.status);
						}
					}
				})
			}
	});
	function clearbottomImg2(){
		$('#business_bottomImgPreview').find('img').attr('src','').hide();
		$('#business_bottomImgPreview').find('a').hide();
		$('#business_bottomImg').val('');
	}
	function chooseLink(urlname,url,args) {
		var $scope = angular.element(document.querySelector('[ng-controller=personCtrl]')).scope();
		$scope.chooseLink(urlname,url,args);
		$scope.$apply();
	}
	</script>

<script>	

	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		var index = layer.load();
		$.post("{:url('busnesssave')}",field,function(data){
			layer.close(index);
			dialog(data.msg,data.status);
			if(data.status == 1){
				setTimeout(function(){
					reload()
				},1000)
			}
		})
	})
  </script>

	{include file="public/copyright"/}
</body>
</html>